package com.panfeng.xcloud.boss.provider.assets;

import com.panfeng.xcloud.component.trace.annotation.EnableTrace;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.data.mongo.MongoDataAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.JdbcTemplateAutoConfiguration;
import org.springframework.boot.autoconfigure.kafka.KafkaAutoConfiguration;
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import tk.mybatis.spring.annotation.MapperScan;

@ComponentScan(basePackages = "com.panfeng.xcloud")
@SpringBootApplication(exclude = {JdbcTemplateAutoConfiguration.class,
        KafkaAutoConfiguration.class, DataSourceAutoConfiguration.class,
        MongoDataAutoConfiguration.class, MongoAutoConfiguration.class})
@EnableDiscoveryClient
@EnableTrace(isEnabled = true)
@EnableAsync
@EnableFeignClients(basePackages = "com.panfeng.xcloud.**")
@MapperScan(basePackages = "com.panfeng.xcloud.**.mapper")
@EnableScheduling
@Slf4j
public class AssetsBossAppServer {

    public static void main(String[] args) {
        log.info(">>> 启动 AssetsBossAppServer 开始<<<");
        SpringApplication.run(AssetsBossAppServer.class, args);
        log.info(">>> 启动 AssetsBossAppServer 结束 <<<");
    }

}
